/*
 * @Author: YuanSong
 * @Date: 2021-11-24 21:02:06
 * @Last Modified by: YuanSong
 * @Last Modified time: 2022-01-18 20:43:19
 */

import React from "react";
import NormalPage from "@components/NormalPage";
import { withRouter, RouteComponentProps } from "react-router-dom";
import { connect } from "react-redux";
import { AppState } from "@redux/reducers";
import { requestLogOut } from "@redux/actions/user";
import { bindActionCreators } from "redux";
import HomeItem from "@components/HomeItem";
type IProps = RouteComponentProps;
class Home extends React.Component<IProps> {
  componentDidMount() {
    this.initRoom();
  }
  initRoom() {
    let videoElement = document.getElementById("videoPlay");
    
  }
  render() {
    return (
      <NormalPage showHeader={true} showRightNavigation={false}>
        {/* <video
          id="videoPlay"
          src="http://localhost:9001/api/bioscope/video"
          controls
        ></video> */}
        {/* <div id="controlBar">
          <div id="allBar">
            
            <button id="playerBar"></button>
            <button id="barButton"></button>
          </div>
        </div> */}
        <div className="HomeItem-Parent-Wrapper">
          <HomeItem path="movieGallery" backImgUrl="screening_room.jpg" entryName="放映室"/>
          <HomeItem path="managePage" backImgUrl="configure.jpeg" entryName="配置间"/>
        </div>
      </NormalPage>
    );
  }
}

export default connect(
  (state: AppState) => state.global,
  (dispatch) =>
    bindActionCreators(
      {
        requestLogOut,
      },
      dispatch
    )
)(withRouter(Home));
